<?php echo form_open_multipart(uri_string())?> 

    <table class="form">
        <tr>
            <td class="required label" style="width: 150px;">Tên khách hàng</td>
            <td><input type="text" name="fullname" id="code" class="w500" value="" ></td>
        </tr>
         <tr>
            <td class="required label" style="width: 150px;">Tỉnh / Thành phố</td>
            <td><select id="city_id" name="city_id" class="w200">
                    <option value=""> Chọn Tỉnh / Thành phố</option>
                    <?php echo $option_pid ?>
                </select></td>
        </tr>
        <tr>
            <td class="required label" style="width: 150px;">Quận / Huyện</td>
            <td><select id="district_id" name="district_id" class="w200">
                    <option value=""> Chọn tỉnh thành</option>
                    
                </select></td>
        </tr>
         <tr>
            <td class="required label" style="width: 150px;">Địa chỉ</td>
            <td><input type="text" name="address" id="address" class="w500" value="" ></td>
        </tr>
        
        <tr>
            <td class="required label" style="width: 150px;">Điện thoại</td>
            <td><input type="text" name="phone" id="phone" class="w500" value="" ></td>
        </tr>
          <tr>
            <td class="label" style="width: 150px;">Email khách hàng</td>
            <td><input type="text" name="email" id="email" class="w500" value="" ></td>
        </tr>
         <tr>
            <td class=" label" style="width: 150px;">Phí giao hàng </td>
            <td><input type="text" name="ship" id="ship" class="w500" value="" ></td>
        </tr>
           <tr>
            <td class="required label" style="width: 150px;">Ngày đặt</td>
            <td><input type="text" name="dt_create" id="datepicker" class="w500" value=""></td>
        </tr> 
          
        <tr>
            <td class="label">Trạng thái</td>
            <td> <?php echo $option_status?></td>
        </tr>
        <tr>
            <td colspan="2" align="center">
                <input type="submit" name="bt_submit" value="" class="capnhat">
            </td>
        </tr>  
    </table>
    
<?php echo form_close()?>

<script type="text/javascript">
	$(document).ready(function(){
		$("#answer_list").hide();
		$("#city_id").change(function(){
		 var city_id=$(this).val();
		 $.ajax({
		   type : 'POST',
		   url : "<?php echo base_url()?>orders/option_district/" + city_id,
		   data: {city_id:city_id},
		   dataType: "html",
		   success : function(data){
			 $("#district_id").html(data);
		   }
		 })
		});
	});
 
</script>

<script type="text/javascript">
$().ready(function() {
	<!-- CÁCH 2 SỬ DỤNG KEYPRESS CỦA JQUERY -->
	$('#phone').yamFormat({type : 'int'});
	$('#ship').yamFormat({type : 'int'});
})
</script>
<script>
  $(function() {
    $( "#datepicker" ).datepicker({
      changeMonth: true,
      changeYear: true
    });
	$( "#datepicker" ).datepicker( "option", "dateFormat",'yy-mm-dd' );
  });
  </script>